|
|
|
|
|
|
|
· Dynaset-type objects: These are used in most cases when you need read and write access to datasets. The Dynaset uses little workstation memory and allows you to create virtual tables by combining fields from different tables in the same database. The Dynaset is the only data object that allows you to read and write to ODBC data sources. |
|
|
|
|
|
|
|
|
· Snapshot-type objects: These are used when you need fast read-only access to datasets. Snapshot objects are stored in workstation memory, so they should be kept small. Snapshots are good for storing validation lists at the workstation or for small reports. |
|
|
|
|
|
|
|
|
You also learned about another data objectthe Database object. You can use the Database object to get a list of tables in the database, a list of indexes associated with the tables, and a list of fields in each of the tables. |
|
|
|
|
|
|
|
|
Day 4
Creating Data Entry Forms with Bound Controls |
|
|
|
|
|
|
|
|
On Day 4, you learned about creating data entry forms with Visual Basic bound data controls. |
|
|
|
|
|
|
|
|
You learned that the Visual Basic data control has five database-related properties. Three refer to the database and two refer to the Dynaset. |
|
|
|
|
|
|
|
|
The Database properties of the Visual Basic data control are |
|
|
|
|
|
|
|
|
· DatabaseName: Used to select the database to access |
|
|
|
|
|
|
|
|
· Exclusive: Used to prevent others from opening the database |
|
|
|
|
|
|
|
|
· ReadOnly: Used to prevent your program from modifying the data in the database |
|
|
|
|
|
|
|
|
The Dynaset properties of the Visual Basic data control are |
|
|
|
|
|
|
|
|
· RecordSource: Used to select the data table within the database |
|
|
|
|
|
|
|
|
· Options: Used to set ReadOnly, DenyWrite, and AppendOnly properties for the Dynaset |
|
|
|
|
|
|
|
|
You learned that the Visual Basic data control has three database-related methods: |
|
|
|
|
|
|
|
|
·Refresh: Used to update the data control after setting properties |
|
|
|
|
|
|
|
|
·UpdateControls: Used to read values from the fields in the Dynaset and write those values to the related form controls |
|
|
|
|
|
|
|
|
·UpdateRecord: Used to read values from the form controls and write those values to the related fields in the Dynaset |
|
|
|
|
|